﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
	<!-- Resource dictionary entries should be defined here. -->
	<LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" StartPoint="0,0" MappingMode="Absolute">
		<GradientStop Color="#ABADB3" Offset="0.05"/>
		<GradientStop Color="#E2E3EA" Offset="0.07"/>
		<GradientStop Color="#E3E9EF" Offset="1"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="NormalBackround" Color="#272727"/>
	<SolidColorBrush x:Key="FocusedBorder" Color="#cfcfcf"/>
	
	<Style BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
		<Setter Property="Foreground" Value="LightGray"/>
		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
		<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Padding" Value="1"/>
		<Setter Property="AllowDrop" Value="true"/>
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
		<Setter Property="Height" Value="22"/>
		<Setter Property="Margin" Value="5"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TextBox}">
					<Border x:Name="Bd" Background="{StaticResource NormalBackround}" CornerRadius="3">
						<ScrollViewer SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ContentHost"/>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
						<Trigger Property="IsKeyboardFocused" Value="true">
							<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource FocusedBorder}"/>
							<Setter TargetName="Bd" Property="BorderThickness" Value="1"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="{x:Type RichTextBox}" BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type RichTextBox}">
        <Style.Resources>
            <Style x:Key="{x:Type FlowDocument}"
           TargetType="{x:Type FlowDocument}">
                <Setter Property="OverridesDefaultStyle"
            Value="true"/>
            </Style>
        </Style.Resources>
    </Style>
	
    <!-- SimpleStyles: PasswordBox -->
    <Style x:Key="{x:Type PasswordBox}" TargetType="{x:Type PasswordBox}">
        <Setter Property="Foreground" Value="LightGray"/>
		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
		<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Padding" Value="1"/>
		<Setter Property="AllowDrop" Value="true"/>
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
		<Setter Property="Height" Value="22"/>
		<Setter Property="Margin" Value="5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Border x:Name="Bd" Background="{StaticResource NormalBackround}" CornerRadius="3">
						<ScrollViewer SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ContentHost"/>
					</Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
							<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
						<Trigger Property="IsKeyboardFocused" Value="true">
							<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource FocusedBorder}"/>
							<Setter TargetName="Bd" Property="BorderThickness" Value="1"/>
						</Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
	
	
	 


</ResourceDictionary>